package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;

/**
 * @Author :蕉绿
 * @Date : 2023/3/7 22:01
 * @Version : V1.0
 * @Description :
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @RequestMapping("/reg")
    public String getReg() {

        System.out.println("执行了reg方法");
        return " get reg~";
    }

    @RequestMapping("/getnum")
    public Integer getNum() {
        return new Random().nextInt(10);
    }

    @RequestMapping("/login")
    public void  login() {

    }
}
